Skip to content

Conversation

Camillarhi
Copy link
Contributor

@Camillarhi Camillarhi commented Sep 17, 2025

Add Child-Pays-For-Parent functionality to allow users to accelerate pending unconfirmed transactions by creating higher-fee child spends. This provides an alternative to Replace-by-Fee bumping when direct transaction replacement is not available or desired.

  • Creates new transactions spending from unconfirmed UTXOs with increased fees
  • Specifically designed for accelerating stuck unconfirmed transactions
  • Miners consider combined fees of parent and child transactions
  • Maintains payment tracking and wallet state consistency
  • Includes integration tests covering various CPFP scenarios
  • Provides clear error handling for unsuitable or confirmed UTXOs

The feature is accessible via bump_fee_cpfp(payment_id) method.

Fixes: #22

Add `Child-Pays-For-Parent` functionality to allow users to accelerate
pending unconfirmed transactions by creating higher-fee child spends.
This provides an alternative to Replace-by-Fee bumping when direct
transaction replacement is not available or desired.

- Creates new transactions spending from unconfirmed UTXOs with increased fees
- Specifically designed for accelerating stuck unconfirmed transactions
- Miners consider combined fees of parent and child transactions
- Maintains payment tracking and wallet state consistency
- Includes integration tests covering various CPFP scenarios
- Provides clear error handling for unsuitable or confirmed UTXOs

The feature is accessible via `bump_fee_cpfp(payment_id)` method.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 17, 2025

I've assigned @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 2nd Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 3rd Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 4th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 5th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 6th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 7th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 8th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 9th Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but I think we'll want #628 to go in first (which in turn probably now should be based on top of another PR utilizing the BDK WalletEvent) so that we have a good way to track any bumps (RBF or CPFP) across our API. Feel free to draft until then.

@Camillarhi
Copy link
Contributor Author

Makes sense, but I think we'll want #628 to go in first (which in turn probably now should be based on top of another PR utilizing the BDK WalletEvent) so that we have a good way to track any bumps (RBF or CPFP) across our API. Feel free to draft until then.

I’ll go ahead and draft a PR that adds the event-based sync logic to update_payment_store, and we can merge that first. Then #628 can build directly on top of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Figure out rebroadcasting / RBF strategy

3 participants